import request from "@/utils/request";

/**
 * 获取员工列表
 * @export
 * @param {*} params
 * @returns
 */
export function getEmployeeListAPI(params) {
  return request.get("/park/sys/user", { params });
}

/**
 * 添加员工
 * @returns
 */
export function createEmployeeAPI(data) {
  return request({
    url: `/park/sys/user`,
    method: "POST",
    data,
  });
}

/**
 * 删除员工
 * @returns
 */
export function delEmployeeAPI(id) {
  return request({
    url: `/park/sys/user/${id}`,
    method: "DELETE",
  });
}

/**
 * 获取单个员工信息
 * @param {*} id 员工id
 * @returns
 */
export function getEmployeeAPI(id) {
  return request.get(`/park/sys/user/${id}`);
}

/**
 * 提交编辑信息
 * @param {*} data 
 * @returns 
 */
export function editEmployeeAPI(data) {
  return request.put("/park/sys/user", data);
}

/**
 * 重置密码
 * @param {*} id 用户id
 * @returns 
 */
export function resetPwdAPI(id) {
  return request.put('/park/sys/user/resetPwd',{id})
}
